﻿<%@ Page Title="" Language="C#" MasterPageFile="~/ws_appPrivada/msContenido.Master" AutoEventWireup="true" CodeBehind="wManUsuario.aspx.cs" Inherits="SRPCENTRIA.ws_appPrivada.wManUsuario" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">

<script type="text/javascript" language="javascript">
    function mostrardiv() {
        div = document.getElementById('ocultar');
        div.style.display = "block";
    }
</script>

    <style type="text/css">
        .style14
        {
            width: 83px;
        }
        .style15
        {
            width: 654px;
        }
        .style16
        {
            width: 190px;
        }
        .style17
        {
            width: 268435120px;
        }
        .style18
        {
            width: 236px;
        }
        .style19
        {
            width: 276px;
        }
        </style>

</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">

<form runat="server" id="form1">

<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>

<table width=100%>
    <tr>
        <td valign="top">
            <table align="center" border="0" cellpadding="0" cellspacing="0" width="100%">
                <tr>
                    <td background="images/caja04.gif" width="14">
                        &nbsp;</td>
                    <td bgcolor="#FFFFFF">
                        <h1>
                            Mantenimiento de Usuario</h1>
                        <div class="round">
                            <span class="top"><span></span></span>
                            <div class="contenido">
                                <h3>
                                    Buscar Usuario</h3>
                                <table cellpadding="2" cellspacing="2" width="100%">
                                    <tr>
                                        <td width="140px">
                                            Nombre de Usuario:</td>
                                        <td>
                                            <asp:TextBox ID="txtBuscar" runat="server" class="formularios" MaxLength="50"  
                                                Width="99%"></asp:TextBox>
                                            <cc1:FilteredTextBoxExtender ID="FtbeNomComercial" runat="server" 
                                                TargetControlID="txtBuscar" 
                                                ValidChars="ABCDEFGHIJKLMNÑOPQRSTUVWXYZabcdefghijklmnñopqrstuvwxyzáéíóúÁÉÍÓÚ. ">
                                            </cc1:FilteredTextBoxExtender>
                                        </td>
                                        <td align="center" width="130">
                                            <asp:Button ID="btnBuscar" runat="server" class="submitBtn" 
                                                onclick="btnBuscar_Click" Text="Buscar" />
                                        </td>
                                    </tr>
                                </table>
                            </div>
                            <span class="bottom"><span></span></span>
                        </div>
                        <div class="round">
                            <span class="top"><span></span></span>
                            <div class="contenido">
                                <h3>
                                    resultado</h3>
                                <p>
                                    <asp:HiddenField ID="hdnCodigo" runat="server" />
                                    <asp:HiddenField ID="hdnPASS" runat="server" />
                                </p>
                                <asp:Label ID="lblError" runat="server" BackColor="#9A5454" BorderStyle="None" 
                                    Font-Strikeout="False" ForeColor="White" Visible="False" Width="100%"></asp:Label>
                                <asp:GridView ID="grvDatos" runat="server" AllowPaging="True" 
                                    AutoGenerateColumns="False" class="tablaMain" 
                                    onpageindexchanging="grvDatos_PageIndexChanging" 
                                    onselectedindexchanged="grvDatos_SelectedIndexChanged" PageSize="5">
                                    <Columns>
                                        <asp:BoundField DataField="IUSU_ID_USUARIO" HeaderText="Codigo">
                                        <ItemStyle CssClass="columnaOscura" Width="1%" />
                                        </asp:BoundField>
                                        <asp:BoundField DataField="Usuario" HeaderText="Usuario">
                                        <ItemStyle CssClass="columnaOscura" Width="10%" />
                                        </asp:BoundField>
                                        <asp:BoundField DataField="NAME" HeaderText="Nombre">
                                        <ItemStyle Width="15%" />
                                        </asp:BoundField>
                                        <asp:BoundField DataField="APELLIDO" HeaderText="Apellido"  >
                                        <ItemStyle Width="15%" />
                                        </asp:BoundField>
                                        <asp:BoundField DataField="Perfil" HeaderText="Perfil">
                                        <ItemStyle CssClass="columnaOscura" Width="15%" />
                                        </asp:BoundField>
                                        <asp:BoundField DataField="VUSU_EMAIL" HeaderText="E-mail">
                                        <ItemStyle Width="15%" />
                                        </asp:BoundField>
                                        <asp:BoundField DataField="EMPRESA" HeaderText="Empresa">
                                        <ItemStyle Width="15%" />
                                        </asp:BoundField>
                                        <asp:BoundField DataField="Estado" HeaderText="Estado">
                                        <ItemStyle CssClass="columnaOscura" Width="1%" />
                                        </asp:BoundField>                                   
                                        <asp:CommandField ButtonType="Image" HeaderText="Editar" 
                                            SelectImageUrl="~/images/ico_editar.gif" ShowSelectButton="True" >
                                        <ItemStyle Width="1%" />
                                        </asp:CommandField>
                                    </Columns>
                                </asp:GridView>
                            </div>
                            <span class="bottom"><span></span></span>
                        </div>
                        <asp:Panel ID="pnlmantenimieto" runat="server" CssClass="CajaDialogo" 
                            Width="100%">
                            <div class="round">
                                <span class="top"><span></span></span>
                                <div class="contenido">
                                    <h3>
                                        Nuevo / Editar Usuario</h3>
                                    <table cellpadding="2" cellspacing="2" width="100%">
                                        <tr>
                                            <td align="right" class="style14"    >
                                                Usuario:</td>
                                            <td align="center" class="style15"   >
                                                <asp:TextBox ID="TxtUsuario" runat="server" class="formularios" MaxLength="20" 
                                                    Width="99%"></asp:TextBox>
                                            </td>
<%--                                            <cc1:FilteredTextBoxExtender ID="FilteredTextBoxExtender2" runat="server" 
                                                TargetControlID="TxtUsuario" 
                                                ValidChars="ABCDEFGHIJKLMNÑOPQRSTUVWXYZabcdefghijklmnñopqrstuvwxyz ">
                                            </cc1:FilteredTextBoxExtender>--%>
                                            <td></td>
                                          
                                        </tr>
                                        <tr>
                                            <td align="right" class="style14"    >
                                                Nombres:</td>
                                            <td align="center" class="style15"   >
                                                <asp:TextBox ID="txtNombres" runat="server" class="formularios" MaxLength="30" 
                                                    Width="99%"></asp:TextBox>
<%--                                                <cc1:FilteredTextBoxExtender ID="FilteredTextBoxExtender3" runat="server" 
                                                    TargetControlID="txtNombres" 
                                                    ValidChars="ABCDEFGHIJKLMNÑOPQRSTUVWXYZabcdefghijklmnñopqrstuvwxyzáéíóú()ÁÉÍÓÚ. ">
                                                </cc1:FilteredTextBoxExtender>--%>
                                            </td>
<%--                                            <cc1:FilteredTextBoxExtender ID="FilteredTextBoxExtender6" runat="server" 
                                                TargetControlID="TxtUsuario" 
                                                ValidChars="ABCDEFGHIJKLMNÑOPQRSTUVWXYZabcdefghijklmnñopqrstuvwxyzáéíóú()ÁÉÍÓÚ. ">
                                            </cc1:FilteredTextBoxExtender>--%>
                                             <td></td>
                                        </tr>
                                        <tr>
                                            <td align="right" class="style14"    >
                                                Apellidos:</td>
                                            <td align="center" class="style15"   >
                                                <asp:TextBox ID="txtApellidos" runat="server" class="formularios" 
                                                    MaxLength="30" Width="99%"></asp:TextBox>
<%--                                                <cc1:FilteredTextBoxExtender ID="FilteredTextBoxExtender4" runat="server" 
                                                    TargetControlID="txtApellidos" 
                                                    ValidChars="ABCDEFGHIJKLMNÑOPQRSTUVWXYZabcdefghijklmnñopqrstuvwxyz- ">
                                                </cc1:FilteredTextBoxExtender>--%>
                                            </td>
                                            <cc1:FilteredTextBoxExtender ID="FilteredTextBoxExtender7" runat="server" 
                                                TargetControlID="TxtUsuario" 
                                                ValidChars="ABCDEFGHIJKLMNÑOPQRSTUVWXYZabcdefghijklmnñopqrstuvwxyz ">
                                            </cc1:FilteredTextBoxExtender>
                                             <td></td>
                                        </tr>
                                        <tr>
                                            <td align="right" class="style14"    >
                                                E-mail:</td>
                                            <td align="center" class="style15"   >
                                                <asp:TextBox ID="txtEmail" runat="server" class="formularios" MaxLength="20" 
                                                    Width="99%"></asp:TextBox>
                                            </td>
<%--                                            <cc1:FilteredTextBoxExtender ID="FilteredTextBoxExtender8" runat="server" 
                                                TargetControlID="TxtUsuario" 
                                                ValidChars="ABCDEFGHIJKLMNÑOPQRSTUVWXYZabcdefghijklmnñopqrstuvwxyz ">
                                            </cc1:FilteredTextBoxExtender>--%>
                                             <td>
                                                 <asp:RegularExpressionValidator ID="valEmail" runat="server" 
                                                     ControlToValidate="txtEmail" ErrorMessage="Formato incorrecto de Email" 
                                                     ValidationExpression="^([0-9a-zA-Z]+([_.-]?[0-9a-zA-Z]+)*@[0-9a-zA-Z]+[0-9,a-z,A-Z,.,-]*(.){1}[a-zA-Z]{2,4})+$"></asp:RegularExpressionValidator>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td align="right" class="style14"    >
                                                Empresa:</td>
                                            <td  align="left"  >
                                                <asp:RadioButtonList ID="RbEmpresaCentria" runat="server" AutoPostBack="True" 
                                                    RepeatDirection="Horizontal" Width="226px" 
                                                    onselectedindexchanged="RbEmpresa_SelectedIndexChanged">
                                                    <asp:ListItem Value="H">Homologadora</asp:ListItem>
                                                    <asp:ListItem Value="C">Breca</asp:ListItem>
                                                </asp:RadioButtonList>
                                            </td> 
                                            <cc1:FilteredTextBoxExtender ID="FilteredTextBoxExtender9" runat="server" 
                                                TargetControlID="TxtUsuario" 
                                                ValidChars="ABCDEFGHIJKLMNÑOPQRSTUVWXYZabcdefghijklmnñopqrstuvwxyz ">
                                            </cc1:FilteredTextBoxExtender>
                                             <td></td>
                                        </tr>
                                        <tr>
                                            <td align="right" class="style14"    >
                                                &nbsp;</td>
                                            <td class="style15"  >
                                                <asp:DropDownList ID="dllEmpresa" runat="server" class="formularios" 
                                                    Visible="False" Width="95%">
                                                </asp:DropDownList>
                                            </td>
                                            <cc1:FilteredTextBoxExtender ID="FilteredTextBoxExtender10" runat="server" 
                                                TargetControlID="TxtUsuario" 
                                                ValidChars="ABCDEFGHIJKLMNÑOPQRSTUVWXYZabcdefghijklmnñopqrstuvwxyz ">
                                            </cc1:FilteredTextBoxExtender>
                                             <td></td>
                                        </tr>
                                        <tr>
                                            <td align="right"   >
                                                Perfil :</td>
                                            <td align="center"   >
                                                <asp:DropDownList ID="dllPerfil" runat="server" class="formularios" 
                                                    Width="100%">
                                                </asp:DropDownList>
                                            </td>
                                            <cc1:FilteredTextBoxExtender ID="FilteredTextBoxExtender11" runat="server" 
                                                TargetControlID="TxtUsuario" 
                                                ValidChars="ABCDEFGHIJKLMNÑOPQRSTUVWXYZabcdefghijklmnñopqrstuvwxyz ">
                                            </cc1:FilteredTextBoxExtender>
                                             <td></td>
                                        </tr>
                                        <tr>
                                            <td align="right" class="style14"    >
                                                Estado:</td>
                                            <td class="style15" >
                                                <asp:CheckBox ID="chkEstado" runat="server" 
                                                    oncheckedchanged="chkEstado_CheckedChanged" />
                                            </td>
                                            <cc1:FilteredTextBoxExtender ID="FilteredTextBoxExtender12" runat="server" 
                                                TargetControlID="TxtUsuario" 
                                                ValidChars="ABCDEFGHIJKLMNÑOPQRSTUVWXYZabcdefghijklmnñopqrstuvwxyz ">
                                            </cc1:FilteredTextBoxExtender>
                                             <td></td>
                                        </tr>
                                        <tr>
                                             <td colspan="3">
                                                 <table align="center" width="100%">
                                                     <tr>
                                                         <td align="right" class="style18">
                                                             Ingresar Contraseña:</td>
                                                         <td align="right" style="text-align: left"  >
                                                             <asp:TextBox ID="txtNuevaC" runat="server" class="formularios" MaxLength="15" 
                                                                 Width="70%" TextMode="Password"></asp:TextBox>
<%--                                                             <cc1:FilteredTextBoxExtender ID="FilteredTextBoxExtender1" runat="server" 
                                                                 TargetControlID="txtNuevaC" 
                                                                 ValidChars="ABCDEFGHIJKLMNÑOPQRSTUVWXYZabcdefghijklmnñopqrstuvwxyz1234567890">
                                                             </cc1:FilteredTextBoxExtender>--%>
                                                         </td>
                                                         <td align="left" class="style16">
                                                             Ingresar Nuevamente Contraseña:</td>
                                                         <td align="left"   colspan="3">
                                                             <asp:TextBox ID="txtNuevaC2" runat="server" class="formularios" MaxLength="15" 
                                                                 Width="70%" TextMode="Password"></asp:TextBox>
<%--                                                             <cc1:FilteredTextBoxExtender ID="FilteredTextBoxExtender5" runat="server" 
                                                                 TargetControlID="txtNuevaC2" 
                                                                 ValidChars="ABCDEFGHIJKLMNÑOPQRSTUVWXYZabcdefghijklmnñopqrstuvwxyz1234567890">
                                                             </cc1:FilteredTextBoxExtender>--%>
                                                         </td>
                                                         <td>
                                                         </td>
                                                     </tr>
                                                 </table>
                                            </td>
                                        </tr>
                                         <tr>
                                            
                                            <td colspan="3" align="center">
                                                <asp:Button ID="btnAgregar" runat="server" class="submitBtn" 
                                                    onclick="btnAgregar_Click" Text="Agregar Usuario" />
                                                <asp:Button ID="btnEditar" runat="server" class="submitBtn" 
                                                    onclick="btnEditar_Click" Text="Actualizar Usuario" Visible="false" />
                                            </td>
                                        </tr>
                                    </table>
                                    <span class="bottom"><span></span></span>
                                </div>
                            </div>
                        </asp:Panel>
                        <p align="center">
                        </p>
                    </td>
                    <td background="images/caja05.gif" width="14">
                        &nbsp;</td>
                </tr>
                <tr>
                    <td width="14">
                        &nbsp;</td>
                    <td background="images/caja07.gif">
                    </td>
                    <td width="14">
                        &nbsp;</td>
                </tr>
            </table>
        </td>
    </tr>
</table>

</ContentTemplate>
</asp:UpdatePanel>

</form>
</asp:Content>
